package mvp.com.bbc.rcjavaretrofitdaggermvp.model;

import java.util.List;

import io.reactivex.Observable;
import mvp.com.bbc.rcjavaretrofitdaggermvp.app.BaseApplication;
import mvp.com.bbc.rcjavaretrofitdaggermvp.app.apiUrl.ApiUrl;
import mvp.com.bbc.rcjavaretrofitdaggermvp.app.contact.InfoContact;
import mvp.com.bbc.rcjavaretrofitdaggermvp.bean.InfoBean;

/**
 * Created by ${cbf} on 2017/11/24.
 */

public class InfoMode implements InfoContact.InfoMode {
    @Override
    public Observable<List<InfoBean>> infoMode(String type, String page, String limit) {
        ApiUrl.getData data = BaseApplication.getRetrofit().create(ApiUrl.getData.class);
        Observable<List<InfoBean>> observable = data.info(type, page, limit);
        return observable;
    }

    @Override
    public Observable<List<InfoBean>> infoMyQAMode(String type, String page, String limit, String userid) {
        ApiUrl.getMyQAData qaData = BaseApplication.getRetrofit().create(ApiUrl.getMyQAData.class);
        Observable<List<InfoBean>> observable = qaData.infoMyQA(type, page, limit, userid);
        return observable;
    }
}
